package com.csproj.system.resource;

import com.codahale.metrics.annotation.Timed;
import com.csproj.system.service.LanguageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/siiat/v1")
public class LanguageResource {
    private final LanguageService languageService;

    public LanguageResource(LanguageService languageService) {
        this.languageService = languageService;
    }

    @GetMapping("/setlanguage")
    @Timed
    public  void SetLanguage(String lang){
        this.languageService.setLanguage(lang);
    }
}
